import 'package:flutter/material.dart';
import 'package:flutter_examples/examples/Exam_6.dart';

import 'examples/Exam_1.dart';
import 'examples/Exam_10.dart';
import 'examples/Exam_11.dart';
import 'examples/Exam_12.dart';
import 'examples/Exam_13.dart';
import 'examples/Exam_14.dart';
import 'examples/Exam_15.dart';
import 'examples/Exam_16.dart';
import 'examples/Exam_17.dart';
import 'examples/Exam_18.dart';
import 'examples/Exam_19.dart';
import 'examples/Exam_2.dart';
import 'examples/Exam_20.dart';
import 'examples/Exam_21.dart';
import 'examples/Exam_22.dart';
import 'examples/Exam_23.dart';
import 'examples/Exam_24.dart';
import 'examples/Exam_25.dart';
import 'examples/Exam_26.dart';
import 'examples/Exam_27.dart';
import 'examples/Exam_28.dart';
import 'examples/Exam_29.dart';
import 'examples/Exam_3.dart';
import 'examples/Exam_4.dart';
import 'examples/Exam_5.dart';
import 'examples/Exam_7.dart';
import 'examples/Exam_8.dart';
import 'examples/Exam_9.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: ListView(
        children: <Widget>[
          ListTile(
            /**1.Widget管理自身状态*/
            title: Text("Widget管理自身状态"),
            onTap: (){
              Navigator.push(context, new MaterialPageRoute(builder: (context)=> new Exam_1()));
            },
          ),
          /**2.父widget管理子widget的状态*/
          ListTile(
            title: Text("父widget管理子widget的状态"),
            onTap: (){
              Navigator.push(context, new MaterialPageRoute(builder: (context) => new Exam_2()));
            },
          ),

          /**3.混合状态管理*/
          ListTile(
            title: Text("混合状态管理"),
            onTap: (){
              Navigator.push(context, new MaterialPageRoute(builder: (context)=> new Exam_3()));
            },
          ),

          /**4.文本及样式*/
          ListTile(
            title: Text("文本及样式"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_4()));
            },
          ),

          /**5.按钮*/
          ListTile(
            title: Text("按钮"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_5()));
            },
          ),

          /**6.图片及Icon*/
          ListTile(
            title: Text("图片及Icon"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_6()));
            },
          ),

          /**7.单选开关和复选框*/
          ListTile(
            title: Text("单选开关和复选框"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context) => new Exam_7()));
            },
          ),

          /**8.输入框和表单*/
          ListTile(
            title: Text("输入框和表单"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (content)=> new Exam_8()));
            },
          ),

          /**9.进度指示器*/
          ListTile(
            title: Text("进度指示器"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_9()));
            },
          ),

          /**10.线性布局Row*/
          ListTile(
            title: Text("线性布局Row"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_10()));
            },
          ),

          /**11.弹性布局Flex*/
          ListTile(
            title: Text("弹性布局Flex"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_11()));
            },
          ),

          /**12.流式布局Wrap Flow*/
          ListTile(
            title: Text("流式布局Wrap Flow"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_12()));
            },
          ),

          /**13.层叠布局Stack Positioned*/
          ListTile(
            title: Text("层叠布局Stack Positioned"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_13()));
            },
          ),
          /**14.对齐与相对定位Align*/
          ListTile(
            title: Text("对齐与相对定位Align"),
            onTap:(){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_14()));
            },
          ),

          /**15.填充Padding*/
          ListTile(
            title: Text("填充Padding"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_15()));
            },
          ),

          /**16.尺寸限制类容器*/
          ListTile(
            title: Text("尺寸限制类容器"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_16()));
            },
          ),

          /**17.装饰容器DecoratedBox*/
          ListTile(
            title: Text("装饰容器DecoratedBox"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_17()));
            },
          ),

          /**18.变换（Transform）*/
          ListTile(
            title: Text("变换（Transform）"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_18()));
            },
          ),

          /**19.Container容器*/
          ListTile(
            title: Text("Container容器"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (content)=> new Exam_19()));
            },
          ),
          /**20.导航栏*/
          ListTile(
            title: Text("Scaffold、TabBar、底部导航"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_20()));
            },
          ),

          /**21.剪裁(Clip)*/
          ListTile(
            title: Text("剪裁(Clip)"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_21()));
            },

          ),
          /**22.SingleChildScrollView*/
          ListTile(
            title: Text("SingleChildScrollView"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (content)=> new Exam_22()));
            },
          ),

          /**23.ListView*/
          ListTile(
            title: Text("ListView"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_23()));
            },
          ),

          /**24.GridView*/
          ListTile(
            title: Text("GridView"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (content)=> new Exam_24()));
            },
          ),

          /**25.CustomScrollViewTestRoute*/
          ListTile(
            title: Text("CustomScrollViewTestRoute"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_25()));
            },
          ),

          /**26.滚动监听及控制*/
          ListTile(
            title: Text("滚动监听及控制-1"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_26()));
            },
          ),

          /**27.滚动监听及控制*/
          ListTile(
            title: Text("滚动监听及控制-2"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_27()));
            },
          ),

          /**28.导航返回拦截(WillPopScope)*/
          ListTile(
            title: Text("导航返回拦截(WillPopScope)"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_28()));
            },
          ),

          /**29.数据共享*/
          ListTile(
            title: Text("数据共享"),
            onTap: (){
              Navigator.push(context, MaterialPageRoute(builder: (context)=> new Exam_29()));
            },
          ),
        ],
      )
     // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
